package cn.zlb.frame.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author yangjie.deng@resico.cn
 * @date 2023-11-09 13:56:17
 * @describe class responsibility
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class BizException extends RuntimeException {
    private Integer errorCode;
    private String errorMsg;

    public BizException(Integer errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    public BizException(String errorMsg) {
        super(errorMsg);
        this.errorCode = 500;
        this.errorMsg = errorMsg;
    }
}
